home *** CD-ROM | disk | FTP | other *** search
/ AppleScript - The Beta Release / AppleScript - The Beta Release.iso / Development Tools / Sample Applications / 7Edit 3.0d7 / 7Edit Source / 7Edit Think C / PLStrs.c < prev   
Encoding:
C/C++ Source or Header  |  1992-11-24  |  465 b   |  26 lines  |  [TEXT/KAHL]

  1. #ifndef    __TYPES__
  2. #include <Types.h>
  3. #endif
  4. #include <memory.h>
  5.  
  6. pascal StringPtr     PLstrcpy(StringPtr str1, StringPtr str2)
  7.     {
  8.       BlockMove(str2, str1, str2[0]);
  9.       return(str1);
  10.     }
  11.     
  12. pascal StringPtr    PLstrcat(StringPtr str1, StringPtr str2)
  13.     {
  14.         long copyLen;
  15.         
  16.       if (str1[0] + 1 + str2[0]>255)
  17.         copyLen = 255 - str1[0];
  18.       else
  19.           copyLen = str2[0];
  20.           
  21.       BlockMove(&str2[1], str1 + 1 + str1[0], copyLen);
  22.       str1[0] += copyLen;
  23.       
  24.       return(str1);
  25.     }
  26.